.class public Lcom/instagram/android/util/q;
.super Ljava/lang/Object;
.source "DelayedBackgroundDetector.java"

# interfaces
.implements Lcom/instagram/android/activity/d;


# instance fields
.field private a:Landroid/os/Handler;

.field private b:Lcom/instagram/android/util/ai;

.field private c:Z

.field private d:Z

.field private e:Z

.field private f:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/instagram/android/util/h;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method private constructor <init>(Lcom/instagram/android/util/ai;)V
    .locals 3
    .parameter

    .prologue
    const/4 v2, 0x1

    .line 42
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 32
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v0, p0, Lcom/instagram/android/util/q;->a:Landroid/os/Handler;

    .line 35
    iput-boolean v2, p0, Lcom/instagram/android/util/q;->c:Z

    .line 36
    iput-boolean v2, p0, Lcom/instagram/android/util/q;->d:Z

    .line 39
    new-instance v0, Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-direct {v0}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/util/q;->f:Ljava/util/List;

    .line 43
    iput-object p1, p0, Lcom/instagram/android/util/q;->b:Lcom/instagram/android/util/ai;

    .line 44
    return-void
.end method

.method synthetic constructor <init>(Lcom/instagram/android/util/ai;Lcom/instagram/android/util/r;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 28
    invoke-direct {p0, p1}, Lcom/instagram/android/util/q;-><init>(Lcom/instagram/android/util/ai;)V

    return-void
.end method

.method public static a()Lcom/instagram/android/util/q;
    .locals 1

    .prologue
    .line 52
    sget-object v0, Lcom/instagram/android/util/s;->a:Lcom/instagram/android/util/q;

    return-object v0
.end method

.method static synthetic a(Lcom/instagram/android/util/q;)Z
    .locals 1
    .parameter

    .prologue
    .line 28
    iget-boolean v0, p0, Lcom/instagram/android/util/q;->c:Z

    return v0
.end method

.method static synthetic a(Lcom/instagram/android/util/q;Z)Z
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 28
    iput-boolean p1, p0, Lcom/instagram/android/util/q;->d:Z

    return p1
.end method

.method static synthetic b(Lcom/instagram/android/util/q;)Z
    .locals 1
    .parameter

    .prologue
    .line 28
    iget-boolean v0, p0, Lcom/instagram/android/util/q;->d:Z

    return v0
.end method

.method static synthetic b(Lcom/instagram/android/util/q;Z)Z
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 28
    iput-boolean p1, p0, Lcom/instagram/android/util/q;->e:Z

    return p1
.end method

.method private c()V
    .locals 2

    .prologue
    .line 78
    iget-object v0, p0, Lcom/instagram/android/util/q;->f:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/util/h;

    .line 79
    invoke-interface {v0}, Lcom/instagram/android/util/h;->c()V

    goto :goto_0

    .line 81
    :cond_0
    return-void
.end method

.method static synthetic c(Lcom/instagram/android/util/q;)V
    .locals 0
    .parameter

    .prologue
    .line 28
    invoke-direct {p0}, Lcom/instagram/android/util/q;->c()V

    return-void
.end method

.method private d()V
    .locals 2

    .prologue
    .line 84
    iget-object v0, p0, Lcom/instagram/android/util/q;->f:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/util/h;

    .line 85
    invoke-interface {v0}, Lcom/instagram/android/util/h;->d()V

    goto :goto_0

    .line 87
    :cond_0
    return-void
.end method


# virtual methods
.method public a(Landroid/app/Activity;)V
    .locals 2
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 92
    iget-object v0, p0, Lcom/instagram/android/util/q;->b:Lcom/instagram/android/util/ai;

    invoke-virtual {v0}, Lcom/instagram/android/util/ai;->b()V

    .line 94
    iput-boolean v1, p0, Lcom/instagram/android/util/q;->c:Z

    .line 95
    iget-boolean v0, p0, Lcom/instagram/android/util/q;->d:Z

    if-eqz v0, :cond_0

    .line 96
    iput-boolean v1, p0, Lcom/instagram/android/util/q;->d:Z

    .line 97
    invoke-direct {p0}, Lcom/instagram/android/util/q;->d()V

    .line 99
    :cond_0
    return-void
.end method

.method public a(Lcom/instagram/android/util/h;)V
    .locals 1
    .parameter

    .prologue
    .line 61
    iget-object v0, p0, Lcom/instagram/android/util/q;->f:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 62
    iget-object v0, p0, Lcom/instagram/android/util/q;->f:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 64
    :cond_0
    return-void
.end method

.method public b(Landroid/app/Activity;)V
    .locals 4
    .parameter

    .prologue
    const/4 v1, 0x1

    .line 104
    iget-object v0, p0, Lcom/instagram/android/util/q;->b:Lcom/instagram/android/util/ai;

    invoke-virtual {v0}, Lcom/instagram/android/util/ai;->b()V

    .line 106
    iput-boolean v1, p0, Lcom/instagram/android/util/q;->c:Z

    .line 109
    iget-boolean v0, p0, Lcom/instagram/android/util/q;->e:Z

    if-eqz v0, :cond_0

    .line 132
    :goto_0
    return-void

    .line 113
    :cond_0
    iput-boolean v1, p0, Lcom/instagram/android/util/q;->e:Z

    .line 115
    iget-object v0, p0, Lcom/instagram/android/util/q;->a:Landroid/os/Handler;

    new-instance v1, Lcom/instagram/android/util/r;

    invoke-direct {v1, p0}, Lcom/instagram/android/util/r;-><init>(Lcom/instagram/android/util/q;)V

    const-wide/16 v2, 0x1388

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_0
.end method

.method public b()Z
    .locals 1

    .prologue
    .line 135
    iget-boolean v0, p0, Lcom/instagram/android/util/q;->d:Z

    return v0
.end method
